﻿#pragma once

#include "./SupervoxelClusteringModel.h"
#include "pcl/includePcl.h"
#include "../common/BasePclProvider.h"

/// <summary>
/// SupervoxelClusteringProvider
/// </summary>
class SupervoxelClusteringProvider : public BasePclProvider
{
    Q_OBJECT

public:
    SupervoxelClusteringProvider();

public:
    void initEditor(QtTreePropertyBrowser* editor);
    void valueChanged(QtProperty*, double) override;
    void valueChanged(QtProperty*, QString) override;
    void valueChanged(QtProperty*, int) override;
    void valueChanged(QtProperty*, bool) override;
    void valueChanged(QtProperty*, const QColor&) override;
    void close() override;
    void doLoadPcd();
    void doAction();

private:
    /**
     * @brief Clustering of Pointclouds into Supervoxels - Theoretical primer
     * https://pcl.readthedocs.io/projects/tutorials/en/master/supervoxel_clustering.html
     * data:
     * https://github.com/PointCloudLibrary/data/blob/master/tutorials/correspondence_grouping/milk_cartoon_all_small_clorox.pcd?raw=true
     * @param cloud
     * @return
     */

    void impl(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud, SupervoxelClusteringModel& model);
};
